<!DOCTYPE html>
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<%--
代码为自动生成 Created by www.magicalcoder.com
 如果你改变了此类 read 请将此行删除
 欢迎加入官方QQ群:323237052
--%>
<html>
<head>
    <%@include file="../../common/head.jsp"%>
    <title>用户表编辑</title>
    <meta content='width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no' name='viewport'>
    <%@include file="../include/head.jsp"%>
</head>
<body class="skin-blue">
    <header class="header">
        <%@include file="../include/top.jsp"%>
    </header>
    <div class="wrapper row-offcanvas row-offcanvas-left">
        <aside class="left-side sidebar-offcanvas">
            <%@include file="../include/left.jsp"%>
        </aside>
        <aside class="right-side">
            <section class="content-header">
                <h1>
                    用户表详情
                    <small></small>
                </h1>
                <ol class="breadcrumb">
                    <li><a href="admin/index"><i class="fa fa-dashboard"></i> 主页</a></li>
                    <li><a href="admin/user_web/list">用户表列表</a></li>
                    <li class="active">用户表详情</li>
                </ol>
            </section>
            <section class="content">
                <div class="row">
                    <div class="col-md-12">
                        <div class="box box-primary">
                            <form class="form-horizontal" role="form" id="form" action="admin/user_web/save" method="post">
                                <div class="box-header">
                                    <h3 class="box-title">
                                        <c:choose><c:when test="${userWeb.id==null}">新增</c:when><c:otherwise>编辑</c:otherwise></c:choose>
                                    </h3>
                                    <h3 class="box-title alert-danger">${exceptionMsg}</h3>
                                </div>
                                <input type="hidden" name="id" value="${userWeb.id}">
                                <input type="hidden" id="queryParamCacheKey" name="queryParamCacheKey" value="${queryParamCacheKey}">

                                <div class="box-body">

                                    <%--userName 登录名称 --%>
                                    <div class="form-group ">
                                        <label class="col-sm-1 control-label">登录名称</label>
                                        <div class="col-sm-9">
                                            <input type="text" class="form-control "  name="userName" title="登录名称"   value="${userWeb.userName}" style="min-width: 100px;"  placeholder="请输入登录名称">
                                        </div>
                                        <label class="col-sm-2 control-label" ><span class="validateMsg"></span></label>
                                    </div>

                                    <%--userPassword 登录密码存储加密后的值 --%>
                                    <div class="form-group ">
                                        <label class="col-sm-1 control-label">登录密码存储加密后的值</label>
                                        <div class="col-sm-9">
                                            <input type="text" class="form-control "  name="userPassword" title="登录密码存储加密后的值"   value="${userWeb.userPassword}" style="min-width: 100px;"  placeholder="请输入登录密码存储加密后的值">
                                        </div>
                                        <label class="col-sm-2 control-label" ><span class="validateMsg"></span></label>
                                    </div>

                                    <%--realName 用户真名 --%>
                                    <div class="form-group ">
                                        <label class="col-sm-1 control-label">用户真名</label>
                                        <div class="col-sm-9">
                                            <input type="text" class="form-control "  name="realName" title="用户真名"   value="${userWeb.realName}" style="min-width: 100px;"  placeholder="请输入用户真名">
                                        </div>
                                        <label class="col-sm-2 control-label" ><span class="validateMsg"></span></label>
                                    </div>

                                    <%--scoreAmount 积分余额 --%>
                                    <div class="form-group ">
                                        <label class="col-sm-1 control-label">积分余额</label>
                                        <div class="col-sm-9">
                                            <input type="text" class="form-control "  name="scoreAmount" title="积分余额"   value="${userWeb.scoreAmount}" style="min-width: 100px;"  placeholder="请输入积分余额">
                                        </div>
                                        <label class="col-sm-2 control-label" ><span class="validateMsg"></span></label>
                                    </div>

                                    <%--moneyAmount 现金余额 --%>
                                    <div class="form-group ">
                                        <label class="col-sm-1 control-label">现金余额</label>
                                        <div class="col-sm-9">
                                            <input type="text" class="form-control "  name="moneyAmount" title="现金余额"   value="${userWeb.moneyAmount}" style="min-width: 100px;"  placeholder="请输入现金余额">
                                        </div>
                                        <label class="col-sm-2 control-label" ><span class="validateMsg"></span></label>
                                    </div>

                                    <%--registTime 注册时间 --%>
                                    <div class="form-group ">
                                        <label class="col-sm-1 control-label">注册时间</label>
                                        <div class="col-sm-9">
                                            <input type="text" name="registTime" class="Wdate form-control"  onfocus="WdatePicker({skin:'whyGreen',dateFmt:'yyyy-MM-dd HH:mm:ss'})" value="<fmt:formatDate value="${ userWeb.registTime }" pattern="yyyy-MM-dd HH:mm:ss"/>" style="min-width: 170px;">
                                        </div>
                                        <label class="col-sm-2 control-label" ><span class="validateMsg"></span></label>
                                    </div>

                                    <%--lastLoginTime 最后登录时间 --%>
                                    <div class="form-group ">
                                        <label class="col-sm-1 control-label">最后登录时间</label>
                                        <div class="col-sm-9">
                                            <input type="text" name="lastLoginTime" class="Wdate form-control"  onfocus="WdatePicker({skin:'whyGreen',dateFmt:'yyyy-MM-dd HH:mm:ss'})" value="<fmt:formatDate value="${ userWeb.lastLoginTime }" pattern="yyyy-MM-dd HH:mm:ss"/>" style="min-width: 170px;">
                                        </div>
                                        <label class="col-sm-2 control-label" ><span class="validateMsg"></span></label>
                                    </div>

                                    <%--accountStatus 账号状态0无效1有效 --%>
                                    <div class="form-group ">
                                        <label class="col-sm-1 control-label">账号状态0无效1有效</label>
                                         <div class="col-sm-9" style="min-width:120px">
                                            <select style="min-width: 100px;" class="form-control" name="accountStatus" title="账号状态0无效1有效"  >
                                                <option <c:if test="${ userWeb.accountStatus == 0 }">selected</c:if> value="0" >类型一</option>
                                                <option <c:if test="${ userWeb.accountStatus == 1 }">selected</c:if> value="1" >类型二</option>
                                            </select>
                                        </div>
                                        <label class="col-sm-2 control-label" ><span class="validateMsg"></span></label>
                                    </div>

                                    <%--sex 性别1男0女 --%>
                                    <div class="form-group ">
                                        <label class="col-sm-1 control-label">性别1男0女</label>
                                         <div class="col-sm-9" style="min-width:120px">
                                            <select style="min-width: 100px;" class="form-control" name="sex" title="性别1男0女"  >
                                                <option <c:if test="${ userWeb.sex == 0 }">selected</c:if> value="0" >类型一</option>
                                                <option <c:if test="${ userWeb.sex == 1 }">selected</c:if> value="1" >类型二</option>
                                            </select>
                                        </div>
                                        <label class="col-sm-2 control-label" ><span class="validateMsg"></span></label>
                                    </div>

                                    <%--birthday 生日 --%>
                                    <div class="form-group ">
                                        <label class="col-sm-1 control-label">生日</label>
                                        <div class="col-sm-9">
                                            <input type="text" name="birthday" class="Wdate form-control"  onfocus="WdatePicker({skin:'whyGreen',dateFmt:'yyyy-MM-dd HH:mm:ss'})" value="<fmt:formatDate value="${ userWeb.birthday }" pattern="yyyy-MM-dd HH:mm:ss"/>" style="min-width: 170px;">
                                        </div>
                                        <label class="col-sm-2 control-label" ><span class="validateMsg"></span></label>
                                    </div>

                                    <%--headImgSrc 头像地址 --%>
                                    <div class="form-group ">
                                        <label class="col-sm-1 control-label">头像地址</label>
                                        <div class="col-sm-9">
                                            <input type="text" class="form-control "  name="headImgSrc" title="头像地址"   value="${userWeb.headImgSrc}" style="min-width: 100px;"  placeholder="请输入头像地址">
                                        </div>
                                        <label class="col-sm-2 control-label" ><span class="validateMsg"></span></label>
                                    </div>

                                    <%--accountLevel 账号等级 --%>
                                    <div class="form-group ">
                                        <label class="col-sm-1 control-label">账号等级</label>
                                         <div class="col-sm-9" style="min-width:120px">
                                            <select style="min-width: 100px;" class="form-control" name="accountLevel" title="账号等级"  >
                                                <option <c:if test="${ userWeb.accountLevel == 0 }">selected</c:if> value="0" >类型一</option>
                                                <option <c:if test="${ userWeb.accountLevel == 1 }">selected</c:if> value="1" >类型二</option>
                                            </select>
                                        </div>
                                        <label class="col-sm-2 control-label" ><span class="validateMsg"></span></label>
                                    </div>

                                    <%--mobile 手机号 --%>
                                    <div class="form-group ">
                                        <label class="col-sm-1 control-label">手机号</label>
                                        <div class="col-sm-9">
                                            <input type="text" class="form-control "  name="mobile" title="手机号"   value="${userWeb.mobile}" style="min-width: 100px;"  placeholder="请输入手机号">
                                        </div>
                                        <label class="col-sm-2 control-label" ><span class="validateMsg"></span></label>
                                    </div>

                                    <%--nickname 昵称 --%>
                                    <div class="form-group ">
                                        <label class="col-sm-1 control-label">昵称</label>
                                        <div class="col-sm-9">
                                            <input type="text" class="form-control "  name="nickname" title="昵称"   value="${userWeb.nickname}" style="min-width: 100px;"  placeholder="请输入昵称">
                                        </div>
                                        <label class="col-sm-2 control-label" ><span class="validateMsg"></span></label>
                                    </div>

                                    <%--twoCodeImgSrc 二维码图片 --%>
                                    <div class="form-group ">
                                        <label class="col-sm-1 control-label">二维码图片</label>
                                        <div class="col-sm-9">
                                            <input type="text" class="form-control "  name="twoCodeImgSrc" title="二维码图片"   value="${userWeb.twoCodeImgSrc}" style="min-width: 100px;"  placeholder="请输入二维码图片">
                                        </div>
                                        <label class="col-sm-2 control-label" ><span class="validateMsg"></span></label>
                                    </div>

                                    <div class="form-group <c:if test="${ logAdminOperateId==null }">hidden</c:if> " id="historyOperateRecords">
                                        <label class="col-sm-1 control-label">历史记录</label>
                                        <div class="col-sm-9" style="min-width:120px">
                                            <select class="form-control" onchange="historySelectChange(this)">
                                                <option value="">请选择</option>
                                                <c:forEach var="log" items="${logAdminOperateList}">
                                                    <option <c:if test="${ log.id==logAdminOperateId }">selected</c:if> value="${log.id}"><fmt:formatDate value="${ log.createTime }" pattern="yyyy-MM-dd HH:mm:ss" />-${ log.userName }</option>
                                                </c:forEach>
                                            </select>
                                        </div>
                                    </div>
                                </div><!-- /.box-body -->
                                <div class="box-footer">
                                    <c:if test="${ adminPriority!=null and ((adminPriority.canInsert and userWeb.id==null) or (adminPriority.canUpdate and userWeb.id!=null))}">
                                        <button type="button" onclick="submitForm('#form')" class="btn btn-danger">保存</button>
                                    </c:if>
                                        <button type="button" onclick="returnToListPage('user_web','${queryParamCacheKey}','${userWeb.id}')"  class="btn btn-primary">返回</button>
                                    <button type="button" onclick="historySelectShow()"  class="btn btn-primary">显示历史记录</button>
                                </div>
                            </form>
                        </div>
                    </div>
                </div>
            </section>
        </aside>
    </div>
    <%@include file="../include/tail.jsp"%>

    <script type="text/javascript" >
        $(function(){
            //base.js
            validateForm("#form")
            initSingleSelect2Ajax($("#form"))
            autoSetSingleSelect2Value($("#form"))
        })
    </script>
</body>
</html>
